package jhunter.web.mvc.params;

import java.util.Enumeration;
import java.util.HashMap;

import javax.servlet.ServletContext;

public class ApplicationMap extends HashMap<String, Object>{

	private static final long serialVersionUID = -5795080091319843549L;

	public ApplicationMap(ServletContext servletContext) {
		@SuppressWarnings("rawtypes")
		Enumeration en = servletContext.getAttributeNames();
		while (en.hasMoreElements()) {
			String name = (String) en.nextElement();
			Object value = servletContext.getAttribute(name);
			super.put(name, value);
		}
	}
}
